package com.myway.components.payment.yeepay.epos;

import java.util.HashMap;
import java.util.Map;

/**
 * 类名称：Info <br/>
 * 类描述：信用卡分账参数 <br/>
 * 创建时间：2015年12月16日 下午7:47:30 <br/>
 * @author 张涛
 * @version V1.0
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
public class Info {
	
	
	 //----------------------------------------支付------------------------------------------------//
	
	/**
	 * 名称：getEposReqFixParameter <br/>
	 * 描述：[支付]-[业务参数] <br/>
	 * @param merId	商户号
	 * @return
	 */
	public static Map getEposReqFixParameter(String merId){
		Map returnMap = new HashMap();
		returnMap.put("p0_Cmd", "ASEposSale");
		returnMap.put("p1_MerId", merId);
		returnMap.put("p4_Cur", "CNY");
		returnMap.put("pr_NeedResponse", "1");
		return returnMap;
	}
	
	/**
	 * 名称：getEposReqHmacOrder <br/>
	 * 描述：[支付]-[加密参数] <br/>
	 * @return
	 */
	public static String[] getEposReqHmacOrder(){
		return new String[] {
				"p0_Cmd", 
				"p1_MerId", 
				"p2_Order", 
				"p3_Amt", 
				"p4_Cur",
				"p5_Pid", 
				"p6_Pdetail", 
				"p8_Url", 
				"pa_CredType", 
				"pb_CredCode", 
				"pe_BuyerTel", 
				"pf_BuyerName", 
				"pt_ActId",
				"pa2_ExpireYear", 
				"pa3_ExpireMonth", 
				"pa4_CVV",
				"pa5_BankBranch",
				"pa_Details",
				"pc_AutoSplit",
				"pr_NeedResponse",
				"py_IsYeePayName",
				"prisk_TerminalCode",
				"prisk_Param"};
	}
	
	
	 //----------------------------------------查询------------------------------------------------//
	
	/**
	 * 名称：getEposQueryHmacOrder <br/>
	 * 描述：[查询]-[加密参数] <br/>
	 * @return
	 */
	public static String[] getEposQueryHmacOrder(){
		return new String[] {
				"p0_Cmd",
				"p1_MerId",
				"p2_Order",
				"pv_Ver",
				"p3_ServiceType"
				};
	}
	
	/**
	 * 名称：getEposQueryBackHmacOrder <br/>
	 * 描述：查询返回参数 <br/>
	 * @return
	 */
	public static String[] getEposQueryBackHmacOrder(){
		return new String[] {
				"r0_Cmd",
				"r1_Code",
				"r2_TrxId",
				"r3_Amt",
				"r4_Cur",
				"r5_Pid",
				"r6_Order",
				"r8_MP",
				"rw_RefundRequestID",
				"rx_CreateTime",
				"ry_FinshTime",
				"rz_RefundAmount",
				"rb_PayStatus",
				"rc_RefundCount",
				"rd_RefundAmt"};
	}
	
	/**
	 * 名称：getEposQueryFixParameter <br/>
	 * 描述：查询请求业务参数 <br/>
	 * @param merId
	 * @return
	 */
	public static Map getEposQueryFixParameter(String merId){
		Map returnMap = new HashMap();
		returnMap.put("p0_Cmd", "QueryOrdDetail");
		returnMap.put("p1_MerId", merId);
		returnMap.put("pv_Ver", "3.0");
		return returnMap;
	}
	
 //----------------------------------------------------------------------------------------//
	
	/**
	 * 名称：getEposRefundHmacOrder <br/>
	 * 描述：[退款]-[加密参数] <br/>
	 * @return
	 */
	public static String[] getEposRefundHmacOrder(){
		return new String[] {"p0_Cmd","p1_MerId","p2_Order","pb_TrxId","p3_Amt","p4_Cur","p5_Desc"}; 
     }
	
	/**
	 * 名称：getEposRefundBackHmacOrder <br/>
	 * 描述：退款加密参数 <br/>
	 * @return
	 */
	public static String[] getEposRefundBackHmacOrder(){
		return new String[] {"r0_Cmd","r1_Code","r2_TrxId","r3_Amt","r4_Cur"};
				 
     }
	
	/**
	 * 名称：getEposRefundFixParameter <br/>
	 * 描述：[退款]-[业务参数] <br/>
	 * @param merId
	 * @return
	 */
	public static Map getEposRefundFixParameter(String merId){
		Map returnMap = new HashMap();
		returnMap.put("p0_Cmd", "RefundOrd");
		returnMap.put("p1_MerId", merId);
		returnMap.put("p4_Cur", "CNY");
		return returnMap;
	}
	
	
	
	//----------------------------------------------------------------------------------------//
	
	// 验证码消费请求和返回参数
	public static String[] getEposVerifySaleReqHmacOrder(){
		return new String[] {"p0_Cmd", "p1_MerId", "p2_Order", "pb_VerifyCode"};
	}
	
	public static Map getEposVerifySaleReqFixParameter(String merId){
		Map returnMap = new HashMap();
		returnMap.put("p0_Cmd", "EposVerifySale");
		returnMap.put("p1_MerId", merId);
		return returnMap;
	}
	
	public static String[] getEposVerifySaleReqBackHmacOrder(){
		return new String[] {"r0_Cmd","r1_Code","r2_TrxId","r6_Order","ro_BankOrderId"};
	}
	
	//----------------------------------------------------------------------------------------//
	
	// 验证码获取请求和返回参数
	public static String[] getEposVerifyCodeReceiveReqHmacOrder(){
		return new String[] {"p0_Cmd", "p1_MerId", "p2_Order"};
	}
	
	public static Map getEposVerifyCodeReceiveReqFixParameter(String merId){
		Map returnMap = new HashMap();
		returnMap.put("p0_Cmd", "EposVerifyCodeReceive");
		returnMap.put("p1_MerId", merId);
		return returnMap;
	}
	
	public static String[] getEposVerifyCodeReceiveReqBackHmacOrder(){
		return new String[] {"r0_Cmd","r1_Code","p1_MerId","r6_Order"};
	}
	
	//----------------------------------------------------------------------------------------//
	
	// 支付返回参数
	public static String[] getEposReqBackHmacOrder(){
		return new String[] {"r0_Cmd","r1_Code","r2_TrxId","r6_Order"}; 
	}
	public static String[] getEposCallbackHmacOrder(){
		return new String[] {"p1_MerId","r0_Cmd","r1_Code","r2_TrxId","r3_Amt","r4_Cur","r5_Pid","r6_Order","r7_Uid",
				"r8_MP","r9_BType"};
	}

}
